/**
 * Created by Tuffy on 16/1/18.
 */
'use strict';

angular.module('starter.controllers')

.controller('VisitDetailCtrl', ['$rootScope','$scope', '$state','CrmHttp', function($rootScope,$scope, $state,CrmHttp) {
    var visitId = $state.params.id;
    $scope.visit =  null;

    CrmHttp.post("/crm/crm-visit-record/findReportVisitById",{visitId:visitId})
        .success(function(data){
            if (data.success) {
                $scope.visit = data.attribute;
            }else{
                console.log('加载失败');
            }
        })
        .error(function(error){
            console.log('加载失败');
        });
}])